package com.tuozixuan.onesql.ui.constant;

public enum QueryFilterOperateEnum {

	EQUAL("{0}={1}", "等于"),
	
	NOT_EQUAL("{0}<>{1}", "不等于"),
	
	LESS_THAN("{0}<{1}", "小于"),
	
	LESS_EQUAL("{0}<={1}", "小于或等于"),
	
	GREATER_THAN("{0}>{1}", "大于"),
	
	GREATER_EQUAL("{0}>={1}", "大于或等于"),
	
	CONTAIN("{0} like '%{1}%'", "包含"),
	
	NOT_CONTAIN("{0} not like '%{1}%'", "不包含"),
	
	START_WITH("{0} like '{1}%'", "开始以"),
	
	END_WITH("{0} like '%{1}'", "结束以"),
	
	IS_NULL("{0} is null", "是null"),
	
	IS_NOT_NULL("{0} is not null", "不是null"),
	
	IS_EMPTY("({0} is null or {0} = '')", "是空的"),
	
	IS_NOT_EMPTY("({0} is not null and {0} = '')", "不是空的"),
	
	BETWEEN("{0} >= {1} and {0} <= {2}", "介于"),
	
	NOT_BETWEEN("{0} < {1} and {0} > {2}", "不介于"),
	
	IN_LIST("{0} in ({1})", "在列表中"),
	
	NOT_IN_LIST("{0} not in ({1})", "不在列表中");

	private String code;
	
	private String desc;
	
	private QueryFilterOperateEnum (String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public String getDesc() {
		return desc;
	}
	
	public String getCode() {
		return code;
	}

}
